package org.iba.coobob;

import android.os.Bundle;
import android.app.ActivityGroup;
import android.content.Intent;
import android.view.Menu;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class Main extends ActivityGroup {
	
	private TabHost tabHost;
	private TabSpec spec;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		tabHost = (TabHost)findViewById(R.id.tabhost);
		tabHost.setup(getLocalActivityManager());
		
		spec = tabHost.newTabSpec("payment");
		spec.setIndicator("결제");
		Intent  payment = new Intent(Main.this, Payment.class);
		spec.setContent(payment);
		tabHost.addTab(spec);
		
		spec = tabHost.newTabSpec("charge");
		spec.setIndicator("충전");
		Intent charge = new Intent(Main.this, Charge.class);
		spec.setContent(charge);
		tabHost.addTab(spec);
		
		spec = tabHost.newTabSpec("more");
		spec.setIndicator("더보기...");
		Intent more = new Intent(Main.this, More.class);
		spec.setContent(more);
		tabHost.addTab(spec);
		
		
		tabHost.setCurrentTab(0);

		//startActivity(new Intent(this, SplashActivity.class));
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
